from rest_framework import serializers
from courseapp.models import Orders, Course_Comment


# 订单类的序列器
class OrderSer(serializers.ModelSerializer):
    class Meta:
        model = Orders
        fields = '__all__'


# 评论类的序列器
class Course_CommentSer(serializers.ModelSerializer):
    class Meta:
        model = Course_Comment
        fields = '__all__'


class Comment1Ser(serializers.ModelSerializer):
    class Meta:
        model = Course_Comment
        fields = ('uid', 'pid', 'content', 'course_id')
